package com.openbravo.ws.externalsales;

import java.net.URL;
import java.rmi.RemoteException;
import java.util.Enumeration;
import java.util.Properties;
import java.util.Vector;
import javax.xml.namespace.QName;
import org.apache.axis.AxisFault;
import org.apache.axis.NoEndPointException;
import org.apache.axis.client.Call;
import org.apache.axis.client.Stub;
import org.apache.axis.constants.Style;
import org.apache.axis.constants.Use;
import org.apache.axis.description.OperationDesc;
import org.apache.axis.description.ParameterDesc;
import org.apache.axis.encoding.DeserializerFactory;
import org.apache.axis.encoding.ser.ArrayDeserializerFactory;
import org.apache.axis.encoding.ser.ArraySerializerFactory;
import org.apache.axis.encoding.ser.BeanDeserializerFactory;
import org.apache.axis.encoding.ser.BeanSerializerFactory;
import org.apache.axis.encoding.ser.EnumDeserializerFactory;
import org.apache.axis.encoding.ser.EnumSerializerFactory;
import org.apache.axis.encoding.ser.SimpleDeserializerFactory;
import org.apache.axis.encoding.ser.SimpleListDeserializerFactory;
import org.apache.axis.encoding.ser.SimpleListSerializerFactory;
import org.apache.axis.encoding.ser.SimpleSerializerFactory;
import org.apache.axis.soap.SOAPConstants;
import org.apache.axis.utils.JavaUtils;

public class ExternalSalesSoapBindingStub extends Stub
  implements ExternalSalesImpl
{
  private Vector cachedSerClasses = new Vector();
  private Vector cachedSerQNames = new Vector();
  private Vector cachedSerFactories = new Vector();
  private Vector cachedDeserFactories = new Vector();
  static OperationDesc[] _operations = new OperationDesc[4];

  private static void _initOperationDesc1()
  {
    OperationDesc localOperationDesc = new OperationDesc();
    localOperationDesc.setName("getProductsCatalog");
    ParameterDesc localParameterDesc = new ParameterDesc(new QName("", "ClientID"), (byte) 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "organizationId"), (byte) 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "salesChannel"), (byte) 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "username"), (byte) 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "password"), (byte) 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localOperationDesc.setReturnType(new QName("http://localhost:8180/openbravo/services/ExternalSales", "ArrayOf_tns1_Product"));
    localOperationDesc.setReturnClass(com.openbravo.ws.externalsales.Product.class);
    localOperationDesc.setReturnQName(new QName("", "getProductsCatalogReturn"));
    localOperationDesc.setStyle(Style.RPC);
    localOperationDesc.setUse(Use.ENCODED);
    _operations[0] = localOperationDesc;
    localOperationDesc = new OperationDesc();
    localOperationDesc.setName("getProductsPlusCatalog");
    localParameterDesc = new ParameterDesc(new QName("", "ClientID"), (byte) 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "organizationId"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "salesChannel"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "username"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "password"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localOperationDesc.setReturnType(new QName("http://localhost:8180/openbravo/services/ExternalSales", "ArrayOf_tns1_ProductPlus"));
    localOperationDesc.setReturnClass([Lcom.openbravo.ws.externalsales.ProductPlus.class);
    localOperationDesc.setReturnQName(new QName("", "getProductsPlusCatalogReturn"));
    localOperationDesc.setStyle(Style.RPC);
    localOperationDesc.setUse(Use.ENCODED);
    _operations[1] = localOperationDesc;
    localOperationDesc = new OperationDesc();
    localOperationDesc.setName("uploadOrders");
    localParameterDesc = new ParameterDesc(new QName("", "ClientID"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "organizationId"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "salesChannel"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "newOrders"), 1, new QName("http://localhost:8180/openbravo/services/ExternalSales", "ArrayOf_tns1_Order"), [Lcom.openbravo.ws.externalsales.Order.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "username"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "password"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localOperationDesc.setReturnType(new QName("http://www.w3.org/2001/XMLSchema", "boolean"));
    localOperationDesc.setReturnClass(Boolean.TYPE);
    localOperationDesc.setReturnQName(new QName("", "uploadOrdersReturn"));
    localOperationDesc.setStyle(Style.RPC);
    localOperationDesc.setUse(Use.ENCODED);
    _operations[2] = localOperationDesc;
    localOperationDesc = new OperationDesc();
    localOperationDesc.setName("getOrders");
    localParameterDesc = new ParameterDesc(new QName("", "ClientID"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "organizationId"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "orderIds"), 1, new QName("http://localhost:8180/openbravo/services/ExternalSales", "ArrayOf_tns1_OrderIdentifier"), [Lcom.openbravo.ws.externalsales.OrderIdentifier.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "username"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localParameterDesc = new ParameterDesc(new QName("", "password"), 1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
    localOperationDesc.addParameter(localParameterDesc);
    localOperationDesc.setReturnType(new QName("http://localhost:8180/openbravo/services/ExternalSales", "ArrayOf_tns1_Order"));
    localOperationDesc.setReturnClass([Lcom.openbravo.ws.externalsales.Order.class);
    localOperationDesc.setReturnQName(new QName("", "getOrdersReturn"));
    localOperationDesc.setStyle(Style.RPC);
    localOperationDesc.setUse(Use.ENCODED);
    _operations[3] = localOperationDesc;
  }

  public ExternalSalesSoapBindingStub()
    throws AxisFault
  {
    this(null);
  }

  public ExternalSalesSoapBindingStub(URL paramURL, javax.xml.rpc.Service paramService)
    throws AxisFault
  {
    this(paramService);
    this.cachedEndpoint = paramURL;
  }

  public ExternalSalesSoapBindingStub(javax.xml.rpc.Service paramService)
    throws AxisFault
  {
    if (paramService == null)
      this.service = new org.apache.axis.client.Service();
    else
      this.service = paramService;
    ((org.apache.axis.client.Service)this.service).setTypeMappingVersion("1.2");
    BeanSerializerFactory localBeanSerializerFactory = BeanSerializerFactory.class;
    BeanDeserializerFactory localBeanDeserializerFactory = BeanDeserializerFactory.class;
    EnumSerializerFactory localEnumSerializerFactory = EnumSerializerFactory.class;
    EnumDeserializerFactory localEnumDeserializerFactory = EnumDeserializerFactory.class;
    ArraySerializerFactory localArraySerializerFactory = ArraySerializerFactory.class;
    ArrayDeserializerFactory localArrayDeserializerFactory = ArrayDeserializerFactory.class;
    SimpleSerializerFactory localSimpleSerializerFactory = SimpleSerializerFactory.class;
    SimpleDeserializerFactory localSimpleDeserializerFactory = SimpleDeserializerFactory.class;
    SimpleListSerializerFactory localSimpleListSerializerFactory = SimpleListSerializerFactory.class;
    SimpleListDeserializerFactory localSimpleListDeserializerFactory = SimpleListDeserializerFactory.class;
    QName localQName1 = new QName("/services/ExternalSales", "BPartner");
    this.cachedSerQNames.add(localQName1);
    Object localObject = BPartner.class;
    this.cachedSerClasses.add(localObject);
    this.cachedSerFactories.add(localBeanSerializerFactory);
    this.cachedDeserFactories.add(localBeanDeserializerFactory);
    localQName1 = new QName("/services/ExternalSales", "Category");
    this.cachedSerQNames.add(localQName1);
    localObject = Category.class;
    this.cachedSerClasses.add(localObject);
    this.cachedSerFactories.add(localBeanSerializerFactory);
    this.cachedDeserFactories.add(localBeanDeserializerFactory);
    localQName1 = new QName("/services/ExternalSales", "Order");
    this.cachedSerQNames.add(localQName1);
    localObject = Order.class;
    this.cachedSerClasses.add(localObject);
    this.cachedSerFactories.add(localBeanSerializerFactory);
    this.cachedDeserFactories.add(localBeanDeserializerFactory);
    localQName1 = new QName("/services/ExternalSales", "OrderIdentifier");
    this.cachedSerQNames.add(localQName1);
    localObject = OrderIdentifier.class;
    this.cachedSerClasses.add(localObject);
    this.cachedSerFactories.add(localBeanSerializerFactory);
    this.cachedDeserFactories.add(localBeanDeserializerFactory);
    localQName1 = new QName("/services/ExternalSales", "OrderLine");
    this.cachedSerQNames.add(localQName1);
    localObject = OrderLine.class;
    this.cachedSerClasses.add(localObject);
    this.cachedSerFactories.add(localBeanSerializerFactory);
    this.cachedDeserFactories.add(localBeanDeserializerFactory);
    localQName1 = new QName("/services/ExternalSales", "Payment");
    this.cachedSerQNames.add(localQName1);
    localObject = Payment.class;
    this.cachedSerClasses.add(localObject);
    this.cachedSerFactories.add(localBeanSerializerFactory);
    this.cachedDeserFactories.add(localBeanDeserializerFactory);
    localQName1 = new QName("/services/ExternalSales", "Product");
    this.cachedSerQNames.add(localQName1);
    localObject = Product.class;
    this.cachedSerClasses.add(localObject);
    this.cachedSerFactories.add(localBeanSerializerFactory);
    this.cachedDeserFactories.add(localBeanDeserializerFactory);
    localQName1 = new QName("/services/ExternalSales", "ProductPlus");
    this.cachedSerQNames.add(localQName1);
    localObject = ProductPlus.class;
    this.cachedSerClasses.add(localObject);
    this.cachedSerFactories.add(localBeanSerializerFactory);
    this.cachedDeserFactories.add(localBeanDeserializerFactory);
    localQName1 = new QName("/services/ExternalSales", "Tax");
    this.cachedSerQNames.add(localQName1);
    localObject = Tax.class;
    this.cachedSerClasses.add(localObject);
    this.cachedSerFactories.add(localBeanSerializerFactory);
    this.cachedDeserFactories.add(localBeanDeserializerFactory);
    localQName1 = new QName("http://localhost:8180/openbravo/services/ExternalSales", "ArrayOf_tns1_Order");
    this.cachedSerQNames.add(localQName1);
    localObject = [Lcom.openbravo.ws.externalsales.Order.class;
    this.cachedSerClasses.add(localObject);
    localQName1 = new QName("/services/ExternalSales", "Order");
    QName localQName2 = null;
    this.cachedSerFactories.add(new ArraySerializerFactory(localQName1, localQName2));
    this.cachedDeserFactories.add(new ArrayDeserializerFactory());
    localQName1 = new QName("http://localhost:8180/openbravo/services/ExternalSales", "ArrayOf_tns1_OrderIdentifier");
    this.cachedSerQNames.add(localQName1);
    localObject = [Lcom.openbravo.ws.externalsales.OrderIdentifier.class;
    this.cachedSerClasses.add(localObject);
    localQName1 = new QName("/services/ExternalSales", "OrderIdentifier");
    localQName2 = null;
    this.cachedSerFactories.add(new ArraySerializerFactory(localQName1, localQName2));
    this.cachedDeserFactories.add(new ArrayDeserializerFactory());
    localQName1 = new QName("http://localhost:8180/openbravo/services/ExternalSales", "ArrayOf_tns1_OrderLine");
    this.cachedSerQNames.add(localQName1);
    localObject = [Lcom.openbravo.ws.externalsales.OrderLine.class;
    this.cachedSerClasses.add(localObject);
    localQName1 = new QName("/services/ExternalSales", "OrderLine");
    localQName2 = null;
    this.cachedSerFactories.add(new ArraySerializerFactory(localQName1, localQName2));
    this.cachedDeserFactories.add(new ArrayDeserializerFactory());
    localQName1 = new QName("http://localhost:8180/openbravo/services/ExternalSales", "ArrayOf_tns1_Payment");
    this.cachedSerQNames.add(localQName1);
    localObject = [Lcom.openbravo.ws.externalsales.Payment.class;
    this.cachedSerClasses.add(localObject);
    localQName1 = new QName("/services/ExternalSales", "Payment");
    localQName2 = null;
    this.cachedSerFactories.add(new ArraySerializerFactory(localQName1, localQName2));
    this.cachedDeserFactories.add(new ArrayDeserializerFactory());
    localQName1 = new QName("http://localhost:8180/openbravo/services/ExternalSales", "ArrayOf_tns1_Product");
    this.cachedSerQNames.add(localQName1);
    localObject = [Lcom.openbravo.ws.externalsales.Product.class;
    this.cachedSerClasses.add(localObject);
    localQName1 = new QName("/services/ExternalSales", "Product");
    localQName2 = null;
    this.cachedSerFactories.add(new ArraySerializerFactory(localQName1, localQName2));
    this.cachedDeserFactories.add(new ArrayDeserializerFactory());
    localQName1 = new QName("http://localhost:8180/openbravo/services/ExternalSales", "ArrayOf_tns1_ProductPlus");
    this.cachedSerQNames.add(localQName1);
    localObject = [Lcom.openbravo.ws.externalsales.ProductPlus.class;
    this.cachedSerClasses.add(localObject);
    localQName1 = new QName("/services/ExternalSales", "ProductPlus");
    localQName2 = null;
    this.cachedSerFactories.add(new ArraySerializerFactory(localQName1, localQName2));
    this.cachedDeserFactories.add(new ArrayDeserializerFactory());
  }

  protected Call createCall()
    throws RemoteException
  {
    try
    {
      Call localCall = super._createCall();
      if (this.maintainSessionSet)
        localCall.setMaintainSession(this.maintainSession);
      if (this.cachedUsername != null)
        localCall.setUsername(this.cachedUsername);
      if (this.cachedPassword != null)
        localCall.setPassword(this.cachedPassword);
      if (this.cachedEndpoint != null)
        localCall.setTargetEndpointAddress(this.cachedEndpoint);
      if (this.cachedTimeout != null)
        localCall.setTimeout(this.cachedTimeout);
      if (this.cachedPortName != null)
        localCall.setPortName(this.cachedPortName);
      Enumeration localEnumeration = this.cachedProperties.keys();
      while (localEnumeration.hasMoreElements())
      {
        String str = (String)localEnumeration.nextElement();
        localCall.setProperty(str, this.cachedProperties.get(str));
      }
      synchronized (this)
      {
        if (firstCall())
        {
          localCall.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
          localCall.setEncodingStyle("http://schemas.xmlsoap.org/soap/encoding/");
          for (int i = 0; i < this.cachedSerFactories.size(); i++)
          {
            Class localClass = (Class)this.cachedSerClasses.get(i);
            QName localQName = (QName)this.cachedSerQNames.get(i);
            Object localObject1 = this.cachedSerFactories.get(i);
            Object localObject2;
            Object localObject3;
            if ((localObject1 instanceof Class))
            {
              localObject2 = (Class)this.cachedSerFactories.get(i);
              localObject3 = (Class)this.cachedDeserFactories.get(i);
              localCall.registerTypeMapping(localClass, localQName, (Class)localObject2, (Class)localObject3, false);
            }
            else
            {
              if (!(localObject1 instanceof javax.xml.rpc.encoding.SerializerFactory))
                continue;
              localObject2 = (org.apache.axis.encoding.SerializerFactory)this.cachedSerFactories.get(i);
              localObject3 = (DeserializerFactory)this.cachedDeserFactories.get(i);
              localCall.registerTypeMapping(localClass, localQName, (org.apache.axis.encoding.SerializerFactory)localObject2, (DeserializerFactory)localObject3, false);
            }
          }
        }
      }
      return localCall;
    }
    catch (Throwable localThrowable)
    {
    }
    throw new AxisFault("Failure trying to get the Call object", localThrowable);
  }

  public Product[] getProductsCatalog(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5)
    throws RemoteException
  {
    if (this.cachedEndpoint == null)
      throw new NoEndPointException();
    Call localCall = createCall();
    localCall.setOperation(_operations[0]);
    localCall.setUseSOAPAction(true);
    localCall.setSOAPActionURI("");
    localCall.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
    localCall.setOperationName(new QName("http://externalSales.ws.erpCommon.openbravo.org", "getProductsCatalog"));
    setRequestHeaders(localCall);
    setAttachments(localCall);
    try
    {
      Object localObject = localCall.invoke(new Object[] { paramString1, paramString2, paramString3, paramString4, paramString5 });
      if ((localObject instanceof RemoteException))
        throw ((RemoteException)localObject);
      extractAttachments(localCall);
      try
      {
        return (Product[])(Product[])localObject;
      }
      catch (Exception localException)
      {
        return (Product[])(Product[])JavaUtils.convert(localObject, [Lcom.openbravo.ws.externalsales.Product.class);
      }
    }
    catch (AxisFault localAxisFault)
    {
    }
    throw localAxisFault;
  }

  public ProductPlus[] getProductsPlusCatalog(String paramString1, String paramString2, String paramString3, String paramString4, String paramString5)
    throws RemoteException
  {
    if (this.cachedEndpoint == null)
      throw new NoEndPointException();
    Call localCall = createCall();
    localCall.setOperation(_operations[1]);
    localCall.setUseSOAPAction(true);
    localCall.setSOAPActionURI("");
    localCall.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
    localCall.setOperationName(new QName("http://externalSales.ws.erpCommon.openbravo.org", "getProductsPlusCatalog"));
    setRequestHeaders(localCall);
    setAttachments(localCall);
    try
    {
      Object localObject = localCall.invoke(new Object[] { paramString1, paramString2, paramString3, paramString4, paramString5 });
      if ((localObject instanceof RemoteException))
        throw ((RemoteException)localObject);
      extractAttachments(localCall);
      try
      {
        return (ProductPlus[])(ProductPlus[])localObject;
      }
      catch (Exception localException)
      {
        return (ProductPlus[])(ProductPlus[])JavaUtils.convert(localObject, [Lcom.openbravo.ws.externalsales.ProductPlus.class);
      }
    }
    catch (AxisFault localAxisFault)
    {
    }
    throw localAxisFault;
  }

  public boolean uploadOrders(String paramString1, String paramString2, String paramString3, Order[] paramArrayOfOrder, String paramString4, String paramString5)
    throws RemoteException
  {
    if (this.cachedEndpoint == null)
      throw new NoEndPointException();
    Call localCall = createCall();
    localCall.setOperation(_operations[2]);
    localCall.setUseSOAPAction(true);
    localCall.setSOAPActionURI("");
    localCall.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
    localCall.setOperationName(new QName("http://externalSales.ws.erpCommon.openbravo.org", "uploadOrders"));
    setRequestHeaders(localCall);
    setAttachments(localCall);
    try
    {
      Object localObject = localCall.invoke(new Object[] { paramString1, paramString2, paramString3, paramArrayOfOrder, paramString4, paramString5 });
      if ((localObject instanceof RemoteException))
        throw ((RemoteException)localObject);
      extractAttachments(localCall);
      try
      {
        return ((Boolean)localObject).booleanValue();
      }
      catch (Exception localException)
      {
        return ((Boolean)JavaUtils.convert(localObject, Boolean.TYPE)).booleanValue();
      }
    }
    catch (AxisFault localAxisFault)
    {
    }
    throw localAxisFault;
  }

  public Order[] getOrders(String paramString1, String paramString2, OrderIdentifier[] paramArrayOfOrderIdentifier, String paramString3, String paramString4)
    throws RemoteException
  {
    if (this.cachedEndpoint == null)
      throw new NoEndPointException();
    Call localCall = createCall();
    localCall.setOperation(_operations[3]);
    localCall.setUseSOAPAction(true);
    localCall.setSOAPActionURI("");
    localCall.setSOAPVersion(SOAPConstants.SOAP11_CONSTANTS);
    localCall.setOperationName(new QName("http://externalSales.ws.erpCommon.openbravo.org", "getOrders"));
    setRequestHeaders(localCall);
    setAttachments(localCall);
    try
    {
      Object localObject = localCall.invoke(new Object[] { paramString1, paramString2, paramArrayOfOrderIdentifier, paramString3, paramString4 });
      if ((localObject instanceof RemoteException))
        throw ((RemoteException)localObject);
      extractAttachments(localCall);
      try
      {
        return (Order[])(Order[])localObject;
      }
      catch (Exception localException)
      {
        return (Order[])(Order[])JavaUtils.convert(localObject, [Lcom.openbravo.ws.externalsales.Order.class);
      }
    }
    catch (AxisFault localAxisFault)
    {
    }
    throw localAxisFault;
  }

  static
  {
    _initOperationDesc1();
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.ws.externalsales.ExternalSalesSoapBindingStub
 * JD-Core Version:    0.6.0
 */